// @ts-ignore
/* eslint-disable */
import { request } from "@umijs/max";

/** 此处后端没有提供注释 GET /auth/getCurrentUserInfo */
export async function getCurrentUserInfo(options?: { [key: string]: any }) {
  return request<API.Result>("/auth-center/auth/getCurrentUserInfo", {
    method: "GET",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /auth/login */
export async function login(
  body: Record<string, any>,
  options?: { [key: string]: any }
) {
  return request<API.Result>("/auth-center/auth/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /auth/logout */
export async function logout(options?: { [key: string]: any }) {
  return request<API.Result>("/auth-center/auth/logout", {
    method: "POST",
    ...(options || {}),
  });
}

/** 此处后端没有提供注释 POST /auth/register */
export async function register(
  body: API.AuthDTO,
  options?: { [key: string]: any }
) {
  return request<API.Result>("/auth-center/auth/register", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
